package com.hro.hro_app.model;

import java.util.ArrayList;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

@Root
public class Device {

	@Attribute
	private String deviceId;

	@ElementList(inline = true, required = false)
	private ArrayList<Teacher> teachers;

	public Device() {

		this.teachers = new ArrayList<Teacher>();
	}

	public Device(String deviceId) {

		this.deviceId = deviceId;

		this.teachers = new ArrayList<Teacher>();
	}

	public String getDeviceId() {

		return this.deviceId;
	}

	public int getTeacherCount() {

		return this.teachers.size();
	}

	public Teacher getTeacherAt(int index) {

		return this.teachers.get(index);
	}

	public void addTeacher(Teacher teacher) {

		this.teachers.add(teacher);
	}

	public void addTeacherList(ArrayList<Teacher> teachers) {

		this.teachers = teachers;
	}
}
